package io.scnb.lesson001.demo22.test4;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

/**
 * 使用FilterType.ASSIGNABLE_TYPE，
 * 当被扫描的类是IService接口的子类时，才会被注册到容器中
 */
@ComponentScan(
        useDefaultFilters = false, //不启用默认过滤器
        includeFilters = {
                @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = IService.class)
        }
)
public class ScanBean4 {
}
